package Domain;
/*
编写一个Student类，包含name、gender、age、id、score属性，分别为String、String、int、int、double类型。
类中声明一个say方法，该方法用于展示对象的所有信息。
 */
public class Student {
    private String name;
    private String gender;
    private int age;
    private int id;
    private double score;
//Constructor=============================================================================
    public Student() {

    }

    public Student(String name, double score) {
        this.name = name;
        this.score = score;
    }

    public Student(String name, String gender, int age, int id, double score) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.id = id;
        this.score = score;
    }
//Getter and Setter=======================================================================
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
//Method==================================================================================
    public void say(){
        System.out.println("姓名："+getName());
        System.out.println("性别："+getGender());
        System.out.println("年龄："+getAge());
        System.out.println("学号："+getId());
        System.out.println("分数："+getScore());
    }

    }

